package top.lisicheng.factory;

import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.Nullable;

import top.lisicheng.Account;
import top.lisicheng.DingTalkAccount;
import top.lisicheng.QQAccount;
import top.lisicheng.WechatAccount;

/**
 * 账号工厂
 * 
 * @author lisicheng
 */
public class AccountFactory {

    public @Nullable Account getAccount(@NotNull int type) {

        if (type == 0) {
            return new QQAccount();
        }

        if (type == 1) {
            return new WechatAccount();
        }

        if (type == 2) {
            return new DingTalkAccount();
        }

        return null;
    }

}
